#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    for (int id = 1;;++id){
        char s[256];
        snprintf(s,256,"rand.exe > test%d.in",id);
        system(s); // 运行随机数据生成器
        snprintf(s,256,"(my.exe < test%d.in) > test%d.out",id,id);
        system(s); // 运行错误代码
        snprintf(s,256,"(sol.exe < test%d.in) > test%d.ans",id,id);
        system(s); // 运行正确代码
        snprintf(s,256,"fc test%d.out test%d.ans > fcout.tmp",id,id);
        if(system(s)) { // 比较
            printf("Wrong Answer. id=%d.\n",id);
            break;
        }
        printf("Accepted! id=%d.\n",id);
    }    
    return 0;
}